package com.weiyi.weiman.domain.status;

/**
 * 枚举类对象
 */
public enum ResultStatus {

    // 公共
    SUCCESS(2000, "请求成功"),
    ERROR(4000, "失败"),
    UNKNOWN_ERROR(9998, "未知异常"),
    SYSTEM_ERROR(9999, "系统异常"),

    INFORMATION_LACK_ERROR(4004, "信息缺失异常"),
    IMAGE_FORMAT_ERROR(4005, "上传图片格式异常"),
    IMAGE_UPLOAD_ERROR(4006, "图片上传失败"),

    NON_PURCHASED_ERROR(4007, "章节未购买错误"),
    NON_COMICS_ERROR(4008, "未找到漫画"),
    NON_CHAPTER_ERROR(4009, "未找到章节"),
    NON_CAROUSEL_ERROR(4010, "未找到轮播图"),

    DB_WRITE_ERROR(4020, "数据写入异常");

    public int code;
    public String message;

    ResultStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}

